//index.js
const e = getApp()

Page({
  data: {
    avatarUrl: './user-unlogin.png',
    userInfo: {},
    guize:false,
    sharetype: "guess",
  },

  onLoad: function() {
    if (!wx.cloud) {
      wx.redirectTo({
        url: '../chooseLib/chooseLib',
      })
      return
    }
    var i = this;
    // 获取用户信息
    /*wx.getSetting({
      success: res => {
        if (res.authSetting['scope.userInfo']) {
          // 已经授权，可以直接调用 getUserInfo 获取头像昵称，不会弹框
          wx.getUserInfo({
            success: res => {
              this.setData({
                avatarUrl: res.userInfo.avatarUrl,
                userInfo: res.userInfo
              })
            }
          })
        }
      }
    })*/

  },
  onShow: function () {

  },
  onReady: function () {
  },

  chuigeshowbox: function() {
    this.setData({
      guize: true
    })
  },
  chuigeclosebox: function() {
    this.setData({
      guize: false
    })
  },
  chuigegame: function() {
    wx.navigateTo({
      url: "/pages/game/game"
    });
  },

  onShareTimeline: function () {

  },
  onShareAppMessage:function(){
}
})
